	$('#wrapWrap').attr('placeholder','可编辑区域');
	var preview = document.getElementById('editorContent');
	/*
 添加标题 (可删除)
 * */
	var imgDelete = $('#imgDelete').val();
	$('.addTitle').on('click',function(){
		//添加标题
		var img2 = document.createElement("img");
	    var imgDD = document.createElement("img");
	    var imgEE = document.createElement("img");
	    var divF = document.createElement('div');
	    var divG = document.createElement('div');
	    var imgDe2 = document.createElement('div');
	    imgDe2.className = "imgDelete";
	    img2.className = "imgDelete";
	    img2.src = imgDelete;
	    imgDD.className = "delete";
	    imgDD.src = imgDelete;
	    imgEE.className = "delete";
	    imgEE.src = imgDelete;
	    
	    divF.className = "editorWrap";
	    divG.contentEditable = "true";
	    divG.setAttribute('placeholder','正文');
	    divG.className = "fs28 comColor editorarea";
	    imgDe2.appendChild(imgDD);
	    divF.appendChild(imgDe2);
	    divF.appendChild(divG);
		preview.appendChild(divF);

	})
/*
 添加图片
 * */
function imagePreview(input){
	var files = input.files;
	var data = new FormData();
	for(var i = 0,len = files.length;i < len;i ++){
		data.append('bannerPics', files[i]);
	}
	$.ajax({
	    url: '/eshop/banner/addBannerPicjson.html',
	    type: 'POST',
	    cache: false,
	    data: data,
	    processData: false,
	    contentType: false,
	    success:function(res){
	    	var obj = JSON.parse(res);
	    	var wrap = $('#editorContent');
			for (var i = 0; i < obj.data.length; i++) {
				//预览新添加的图片
			    var file = obj.data[i].toString();
				var div=document.createElement("div");
				div.className="choosedImg";
			    var img = document.createElement("img");
			    var img2 = document.createElement("img");
			    var imgDelete = $('#imgDelete').val();
			    img2.src = imgDelete;
			    img2.className = "imgDelete";
		        img.src = file;
				div.appendChild(img);
				div.appendChild(img2);
				preview.appendChild(div);
			}
	    },error:function(){
	    	
	    }
})
	}

		//图片去重
		function dele(ob){
			var obj=$(".choosedImg img");
			var yl=obj.length;
			for(var i=0;i<yl;i++){
				var isrc=obj.eq(i).attr("src");
				if(ob==isrc){
					$(".choosedImg img").eq(i).parent().remove();
				}
			}
		}
		window.onload=function(){
			//删除图片
			$("#editorContent").on("touchstart",".imgDelete",function(){
				$(this).parent().remove();
			})
		}
/*
 描述
 * */
$('.direction').on('click',function(){
	$('#wrapWrap').show();
	$('.mainWrap').hide();
})
